public class TreeNodeFactory
{
    public static List<TreeNode> Create(Dictionary<string, List<string>> solutionReferences)
    {
        var treeNodes = new List<TreeNode>();
        foreach (var solutionReference in solutionReferences)
        {
            var treeNode = new TreeNode(solutionReference.Key);
            var parentNodes = solutionReferences.Where(s => s.Value.Contains(treeNode.NodeName)).Select(s => new TreeNode(s.Key)).ToList();
            var childrenNodes = solutionReference.Value.Select(s => new TreeNode(s)).ToList();
            Console.WriteLine("ParentNodeCount: " + parentNodes.Count);
            Console.WriteLine("ChildrenNodeCount: " + childrenNodes.Count);
            treeNode.SetParents(parentNodes);
            treeNode.SetChildrens(childrenNodes);
            treeNodes.Add(treeNode);
        }
        Console.WriteLine(treeNodes.Count());

        return treeNodes;
    }
}